<template>
   <div>
    <router-view></router-view>
  </div>
</template>
<script>
  import { mapGetters } from "vuex";
  export default {
    data() {
      return {
      };
    },
    beforeMount () {
      console.log(1)
      let {isLogin,hasFav}=this.baseData
      if(isLogin){
        if(!hasFav){
        this.$router.replace('/user/favorite')
        }else{
        this.$router.replace('/user/detail')
        }
      }else{
        this.$router.replace('/user/favorite')
      }
      console.log('this.baseData',this.baseData)
    },
    computed: {
      ...mapGetters({baseData:'baseData'})
    }
  };
</script>
<style scoped>
</style>